/** 
 * Description:
 * Date:2011-11-14
 * Author:Along	
*/
package com.community.shopping.web;


import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.community.shopping.domain.Goods;
import com.community.shopping.domain.GoodsType;
import com.community.shopping.service.logic.GoodsManager;
import com.community.shopping.service.logic.GoodsTypeManager;
import com.community.shopping.service.logic.Page;
import com.community.shopping.util.RequestHelp;
@Controller 
public class AdminControl {
	@Autowired  
    private GoodsTypeManager goodsTypeManager;  
	@Autowired  
    private GoodsManager goodsManager;
	
	private SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
	
	@RequestMapping("/admin/orderManage") //订单管理
	 public ModelAndView orderManage(HttpServletRequest request) 
     { 
      ModelAndView modelAndView = new ModelAndView("frame.jsp"); 
      modelAndView.addObject("menu", "left_order.jsp");
      modelAndView.addObject("main", "orderlist.do");
      modelAndView.addObject("type", "order");
     return modelAndView; 		
	  }
	
	@RequestMapping("/admin/productManage") //商品管理
	 public ModelAndView productManage(HttpServletRequest request) 
      { 
       ModelAndView modelAndView = new ModelAndView("frame.jsp"); 
       modelAndView.addObject("menu", "left_goods.jsp");
       modelAndView.addObject("main", "goodslist.do");
       modelAndView.addObject("type", "goods");
      return modelAndView; 		
	  }
	
	@RequestMapping("/admin/activeManage") //促销活动
	 public ModelAndView activeManage(HttpServletRequest request) 
     { 
      ModelAndView modelAndView = new ModelAndView("frame.jsp"); 
      modelAndView.addObject("menu", "left_active.jsp");
      modelAndView.addObject("main", "goodslist.do");
      modelAndView.addObject("type", "active");
      return modelAndView; 		
     }

	
    @RequestMapping("/admin/userManage")//会员管理
	 public ModelAndView userManage(HttpServletRequest request) 
    { 
      ModelAndView modelAndView = new ModelAndView("frame.jsp"); 
      modelAndView.addObject("menu", "left_user.jsp");
      modelAndView.addObject("main", "goodslist.do");
      modelAndView.addObject("type", "user");
      return modelAndView; 		
    } 
    
    @RequestMapping("/admin/indexManage")//首页设置
	 public ModelAndView indexManage(HttpServletRequest request) 
    { 
    	ModelAndView modelAndView = new ModelAndView("frame.jsp"); 
        modelAndView.addObject("menu", "left_index.jsp");
        modelAndView.addObject("main", "goodslist.do");
        modelAndView.addObject("type", "index");
        return modelAndView; 				
    } 
    
    @RequestMapping("/admin/settingManage")//网站设置
	 public ModelAndView settingManage(HttpServletRequest request) 
   { 
    	ModelAndView modelAndView = new ModelAndView("frame.jsp"); 
        modelAndView.addObject("menu", "left_set.jsp");
        modelAndView.addObject("main", "goodslist.do");
        modelAndView.addObject("type", "set");
        return modelAndView; 		
   } 
	
}
